agentmux_srv\backend\lsp/mod.rs
1// Copyright 2026, AgentMux Corp.
2// SPDX-License-Identifier: Apache-2.0
3//
4// Language Server Protocol support — Phase 1 of
5// SPEC_EDITOR_LSP_AND_THEMES_2026-05-26.md.
6//
7// The backend is a **process supervisor + message proxy**. It doesn't
8// understand LSP semantics (the frontend's LspClient does); it just
9// spawns the server binary, frames messages on the wire, and routes
10// JSON-RPC bodies in/out. One server per (workspace_root, language).
11//
12// Surface:
13// - LspSupervisor::start(args) → spawn (or attach to) a server
14// - LspSupervisor::send(id, msg) → forward an LSP message
15// - LspSupervisor::stop(id) → decrement refcount, drop on zero
16//
17// Server-pushed messages (publishDiagnostics, $/progress, etc.) are
18// broadcast via the EventBus as `lsp:message` events.
19
20pub mod supervisor;
21pub mod workspace;
22
23pub use supervisor::{LspSupervisor, ServerId, StartArgs, StartResult};